import { get, put, post, del } from "../utils/request";

// 获取收货地址列表
export const addresseList = () => get("/api/v1/addresses");

// 获取单条收货地址
export const singleAddresse = (id) => get("/api/v1/addresses/" + id);

// 收货地址新增
export const addToaddresses = (data) => post("/api/v1/addresses", data);

// 收货地址修改
export const changeAddresses = ({ id, data }) => put("/api/v1/addresses/" + id, data);

// 删除收货地址
export const delAddress = (id) => del("/api/v1/addresses/" + id);

